{% extends 'base.html' %}
{% block content %}
  <section>
    <h2>框架模式设置（区分框架仓库与上游仓库）</h2>
    <form method="post">
      <label>模式:</label>
      <select name="mode" required>
        <option value="submodule" {% if mode=='submodule' %}selected{% endif %}>submodule</option>
        <option value="subtree" {% if mode=='subtree' %}selected{% endif %}>subtree</option>
        <option value="vendor" {% if mode=='vendor' %}selected{% endif %}>vendor</option>
        <option value="ignored" {% if mode=='ignored' %}selected{% endif %}>ignored</option>
      </select>
      <br/>
      <label>上游仓库地址(remote):</label>
      <input type="text" name="remote" value="{{ remote }}" placeholder="https://github.com/org/AIDevFlow.git" />
      <br/>
      <label>上游分支(branch):</label>
      <input type="text" name="branch" value="{{ branch }}" />
      <br/>
      <label>
        <input type="checkbox" name="apply" {% if applied %}checked{% endif %} />
        ignored 模式应用 .gitignore 变更
      </label>
      <br/>
      <button type="submit">生成建议并记录模式</button>
    </form>
    <p>说明：此页面以 Python 逻辑复刻脚本行为，避免直接调用 shell。</p>
    {% if output %}
      <h3>输出</h3>
      <pre>{{ output }}</pre>
    {% endif %}
  </section>
{% endblock %}

